﻿using Microsoft.AspNetCore.Http;

namespace YiShop.Framework.Extensions
{
    public static class HttpContextExtensions
    {
        /// <summary>
        /// 获取浏览器标识
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public static string GetUserAgent(this HttpContext context)
        {
            return context.Request.Headers["User-Agent"];
        }
    }
}